import random
number = random.randint(1,100)

while True:
    number_inp = input('请输入：')
    if not number_inp.isdigit():
        print('请输入数字')
    elif int(number_inp) <= 1 or int(number_inp) >= 100:
        print('请输入1到100以内的数字')
    else:
        if int(number_inp) < number:
            print('number_inp < number')
        elif int(number_inp) > number:
            print('number_inp > number')
        else:
            print('number_inp == number')
            break

print('number == ',number)

